const article = {
    state:{
        types:[],
        labels:[]
    },
    mutations:{
        // 设置label标签
        SET_LABELS(state,labels){
            state.labels = labels
        },

        // 设置types类型
        SET_TYPES(state,types){
            state.types = types
        }

    },
    actions:{
        // 设置labels和types
        setLabelAndTypeAction({commit},data){
            commit("SET_LABELS",data.labels)
            commit("SET_TYPES",data.types)
        },

        // 单独设置labels
        setLabelsAction({commit},labels){
            commit("SET_LABELS",labels)
        },

        // 单独设置types
        setTypesAction({commit},types){
            commit("SET_TYPES",types)
        }

    }
}

export default article